home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: usenet.logical.net!news
- From: alexandr@logical.net (Rick & Diane Alexander)
- Subject: Re: printing text on screen
- Sender: news@logical.net
- Message-ID: <DnAy5G.83w@logical.net>
- Date: Sat, 24 Feb 1996 22:51:49 GMT
- X-Nntp-Posting-Host: dialup17.logical.net
- References: <312F86D2.2D3F@kelvin.physics.mun.ca>
- X-Newsreader: Forte Free Agent 1.0.82
-
- Christopher Deacon <cdeacon@kelvin.physics.mun.ca> wrote:
-
- >I want to know how to display a line of text at the bottom of
- >the screen, and how to turn it off again.
-
- >I presume this has something to do with the curses library, but,as
- >usual, documentation is difficult to decipher!
-
- >Chris
- The following may work (I assume you are on a unix system)
- #include <curses.h>
- #include <stdio.h>
- main()
- {
- WINDOW my_window;
- initscr();
- my_window = newwin(0,0, 0, 0);
- nonl();
- cbreak();
- noecho();
- idlok(stdscr, TRUE);
- keypad(stdscr, TRUE);
- move(20,1); /* this will place the cursor at row 20, column 0 */
- printw("Hello, World!");
- refresh(); /* to redraw the screen */
- }
-
-
-